package com.yls.except.util.img;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * Created by xs on 2016/7/12.
 */
public class GetImgUrl {
    public static List<Object> getImgList(List<Map<String, Object>> img, String imgtype) {
        if(img != null && img.size() > 0) {
            List<Object> imglist = new ArrayList<Object>();
            for (int j = 0; j < img.size(); j++) {
                Map<String, Object> imgmap = img.get(j);
                if(imgmap == null)
                    continue;
                String img_address = imgmap.get("img_address") + "";
                if((img_address.length() > 7  && !img_address.substring(0, 7).equals("http://") && !img_address.substring(0, 8).equals("https://")) || img_address .length() <= 7)
                    img_address = imgtype + img_address;
                imglist.add(img_address);
            }
            return imglist;
        } else
            return new ArrayList<Object>();
    }
}
